<template>
    <!-- 修改资料 -->

    <div>
        <!--  v-if="visible"  @click.self="handleClose" -->
        <!-- 内容主题区域 -->
        <ts-card header="基本信息">
          <el-form
            :model="form"
            label-position="right"
            ref="formRef"
            class="borderNone"
            disabled
          >
            <el-row :gutter="20">
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="编号">
                  <el-input v-model="form.number" ></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="客户名称" required>
                  <el-input v-model="form.name"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="简称" required>
                  <el-input v-model="form.forShort"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="目的港" required>
                  <el-input v-model="form.destinationPort"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="运输方式" required>
                    <el-input v-model="form.transportName"></el-input>
                </el-form-item>
              </el-col> 
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="国家">
                    <el-input v-model="form.countryName"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="币种" required>
                    <el-input v-model="form.currencyName"></el-input>
                </el-form-item>
              </el-col> 
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="付款方式">
                  <el-input v-model="form.payMethod"> </el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="地址" required>
                  <el-input v-model="form.corpAddress" type="textarea" />
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="公司电话" prop="corpPhone">
                  <el-input v-model="form.corpPhone"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="贸易条款">
                    <el-input v-model="form.tradeTermsName"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="业务员">
                    <el-input v-model="form.salesName"></el-input>
                </el-form-item>
              </el-col>  
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="权限人员">
                    <el-input v-model="form.authEmployeeIdsName"></el-input>
                </el-form-item>
              </el-col>  
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="备注" prop="remark">
                  <el-input v-model="form.remark"></el-input>
                </el-form-item>
              </el-col>
              <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
                <el-form-item label="状态" prop="status">
                  <el-switch
                    v-model="form.status"
                    size="large"
                    inline-prompt
                    :active-icon="Check"
                    :inactive-icon="Close"
                    active-value="normal"
                    inactive-value="disable"
                  />
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </ts-card>
        <ts-card header="联系人">
            <el-table :data="dataList">
                <el-table-column label="联系人" prop="receiver"></el-table-column>
                <el-table-column label="联系人电话" prop="receiverPhone"></el-table-column>
                <el-table-column label="地址" prop="address"></el-table-column>
                <el-table-column label="邮箱" prop="email"></el-table-column>
            </el-table>
        </ts-card>
    </div>
</template>

<script setup>
import { reactive, ref, onMounted } from 'vue';
import { ElNotification } from 'element-plus';
import { Plus, UploadFilled } from '@element-plus/icons-vue'
import Api from '@/api/model/crm'
const emit = defineEmits(['updatetable'])
const props = defineProps({
    paramsData: {
        type: Object,
        defalut: {}
    }
})
const activeName = ref('first')
// 添加用户数据的对象
const form = ref({})
const dataList = ref([])
const formRef = ref()

onMounted(() => {
    getInit()
})
const getInit = async () => {
    let res = await Api.cust.detail.post(props.paramsData)
    if (res.code == '200') {
        form.value = res.data
        dataList.value = res.dataList
    }

}



</script>

<style scoped lang="less">
.borderNone {
    :deep(.el-input__wrapper) {
        box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
        cursor: default;
        background-color: transparent; //背景颜色透明
        border-bottom: 1px solid #999;
        border-radius: 0;

        .el-input__inner {
            cursor: default !important;
        }
    }
    :deep(.el-textarea__inner) {
            box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
            cursor: default;
            background-color: transparent; //背景颜色透明
            border-bottom: 1px solid #999;
            border-radius: 0;
        }
}
</style>

